package com.dq.keywordMatch;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class test {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add(new SmsSensitiveWord("黄色"));
        list.add(new SmsSensitiveWord("毒品"));
        list.add(new SmsSensitiveWord("赌博"));

        SensitiveWordInit init = new SensitiveWordInit();
        Map map = init.initKeyWord(list);

        String txt = "aaajajajajajaj黄色biiibbb毒品oooo";

        Set<String> sensitiveWord = SensitivewordEngine.getSensitiveWord(txt, 2);
        for (String s : sensitiveWord) {
            System.out.println(s);
        }

    }
}
